// @ts-ignore
/* eslint-disable */
import {request} from '@umijs/max';

/** 此处后端没有提供注释 POST /file/downloadSDK */
export async function download(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.downloadParams,
  options?: { [key: string]: any },
) {
  return request<string>('/file/downloadSDK', {
    method: 'POST',
    params: {
      ...params,
    },
    responseType: 'blob', // 添加这个配置
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /file/uploadSDK */
export async function upload(body: {}, options?: { [key: string]: any }) {
  return request<API.BaseResponseString>('/file/uploadSDK', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
